<template>
  <div class="container">
    <CheckboxGroup v-model="checkboxGroup">
      <Checkbox v-for="(item, index) in checkboxList" :label="item.value" :key="index">
        <span>{{ item.label }}</span>
      </Checkbox>
      <Button type="dashed" size="small" @click="addNewCheckbox">+</Button>
    </CheckboxGroup>
  </div>
</template>

<script>
export default {
  data() {
    return {
      checkboxGroup: [],
      checkboxList: [
        { label: '选项1', value: 'option1', isAdd: true },
        { label: '选项2', value: 'option2', isAdd: false },
        // 更多选项...
      ],
    }
  },
  methods: {
    addNewCheckbox() {
      // 添加新的checkbox项
      this.checkboxList.push({
        label: `新选项`,
        value: `newOption_${this.checkboxList.length}`,
        isAdd: false,
      })
    },
  },
}
</script>
<style scoped lang="less">
.container {
  width: 400px;
}
/deep/ .ivu-checkbox-group {
  width: 100%;
  text-align: left;
}
</style>
